﻿

Public Class CustomerType

    Public Property CustomerId As Guid
    Public Property IdType As String
    Public Property IdNumber As String
    Public Property Name As String
    Public Property Country As String
    Public Property Telephone As String

    Public ReadOnly Property Text As String
        Get
            If (Me.Country <> "") AndAlso (Me.IdNumber <> "") Then
                Return Me.Name & "(" & Me.IdNumber & ", " & Me.Country & ")"
            ElseIf (Me.Country = "") AndAlso (Me.IdNumber <> "") Then
                Return Me.Name & "(" & Me.IdNumber & ")"
            ElseIf (Me.Country <> "") AndAlso (Me.IdNumber = "") Then
                Return Me.Name & "(" & Me.Country & ")"
            End If
            Return Me.Name
        End Get
    End Property

End Class
